bool Insert(List L, ElementType X)
{
    int i = 0, j;
    if (L->Last == MAXSIZE - 1)
        return false;
    while (X < L->Data[i])
        i++;
    if ((L->Data[i]) == X)
        return false;
    j = i;
    for (i = L->Last; i >= j; i--)
        L->Data[i + 1] = L->Data[i];
    L->Data[j] = X;
    L->Last++;
    return true;
}